package itbour.onetouchshow.adapter.base.normal;

/**
 * Created by guoh on 2018/2/28.
 */

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import java.util.List;

import itbour.onetouchshow.adapter.base.BaseAdapterHelper;
import itbour.onetouchshow.adapter.base.multi.BaseItemViewDelegate;

/**
 * Abstraction class of a BaseAdapter in which you only need
 * to provide the convert() implementation.<br/>
 * Using the provided BaseAdapterHelper, your code is minimalist.
 *
 * @param <T> The type of the items in the list.
 */
public abstract class QuickAdapter<T> extends BaseQuickAdapter<T, BaseAdapterHelper> {

    public QuickAdapter(Context context, int layoutResId) {
        super(context, layoutResId);
    }

    public QuickAdapter(Context context, int layoutResId, List<T> data) {
        super(context, layoutResId, data);
    }

    @Override
    protected BaseAdapterHelper getAdapterHelper(int position, BaseItemViewDelegate<T, BaseAdapterHelper> delegate,
                                                 View convertView, ViewGroup parent) {
        return BaseAdapterHelper.get(context, convertView, parent, layoutResId, position);
    }

}
